package com.cgnpc.scp.achievement.service;

import com.cgnpc.cud.core.domain.AjaxResult;
import com.cgnpc.scp.achievement.mybatis.entity.Capacity;
import com.cgnpc.scp.achievement.pojo.CapacityDetail;
import com.cgnpc.scp.achievement.pojo.SaveCapacityReq;
import com.cgnpc.scp.common.bean.CreateFileInfo;
import com.cgnpc.scp.common.bean.MyPageResult;
import com.cgnpc.scp.common.pojo.UserInfo;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Locale;

public interface CapacityService
{
    CapacityDetail save(SaveCapacityReq req);

    CapacityDetail getById(String id);

    MyPageResult<Capacity> queryCapacityPageList(Capacity req);

    boolean delByIds(List<String> ids);

    /**********************************
     * 用途说明: 调试采购管理-基础数据-项目---导出Excel
     * 参数说明: T reqEntity
     * 返回值说明: CreateFileInfo
     ***********************************/
    <T extends Capacity> CreateFileInfo exportExcel(T reqEntity) throws Exception;

    <T extends Capacity> AjaxResult saveOrUpdate(UserInfo loginUserInfo, Locale reqLocale, List<T> reqEntityList);

    <T extends Capacity> AjaxResult importFromExcel(UserInfo loginUserInfo, Locale reqLocale, MultipartFile reqFile) throws Exception;
}
